package com.kgis.map.events {
   import com.kgis.map.layer.Layer;

   import flash.events.Event;
   import com.kgis.map.events.EventBase;

   /**
    * 图层事件
    */
   public class LayerEvent extends EventBase {
      private var _layer:Layer = null;

      /**添加图层到地图上 */
      public static const LAYER_ADDED:String = "pkmap.addlayer";
      /**移除图层*/
      public static const LAYER_REMOVED:String = "pkmap.removelayer";
      /**图层加载开始*/
      public static const LAYER_LOAD_START:String = "pkmap.layerloadstart";
      /**图层加载结束*/
      public static const LAYER_LOAD_END:String = "pkmap.layerloadend";
      /**改变图层顺序*/
      public static const LAYER_CHANGED_ORDER:String = "pkmap.layerChangeOrder";
      /**修改图层可见*/
      public static const LAYER_VISIBLE_CHANGED:String = "pkmap.visibilitychanged";

      public function LayerEvent(type:String, layer:Layer, bubbles:Boolean = false, cancelable:Boolean = false) {
         this._layer = layer;
         super(type, bubbles, cancelable);
      }

      override public function clone():Event {
         return this;
      }

      public function get layer():Layer {
         return this._layer;
      }

      public function set layer(layer:Layer):void {
         this._layer = layer;
      }

   }
}

